<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<h1>
	<fmt:message key="accounts.newSearch.title" />
</h1>

<c:url value="/accounts" var="accountsUrl"/>

	<!--
	  // TODO-08: Optional Bonus: Convert this form to use spring form tags.
	  //          Don't forget to add form:error tags also, like this
	  //             <form:errors cssClass="alert alert-danger" path="..." />
	  //          Put them in the last div with their input fields
	  -->
<form action="${accountsUrl}" method="get" role="form" class="form-horizontal">
	<fieldset>
		<legend>
			<fmt:message key="label.AccountSearchCriteria" />
		</legend>
		<div class="form-group">
			<label class="control-label col-sm-2" for="searchString">
				<fmt:message key="label.AccountSearchCriteria.searchString" />
			</label>
			<div class="col-sm-4"> 
				<input type="text" name="searchString" class="form-control"/>
			</div>
			<div class="col-sm-6">
				<fmt:message key="NotEmpty.accountSearchCriteria.searchString" var="errorMessage" />
				<!-- errors tag here -->		
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-sm-2" for="maximumResults">
				<fmt:message key="label.AccountSearchCriteria.maximumResults" />
			</label>
			<div class="col-sm-4"> 
				<select name="maximumResults" class="form-control">
					<option>5</option>
					<option>10</option>
					<option>15</option>
				</select>
			</div>
		</div>
		<div class="form-group"> 
    		<div class="col-sm-offset-2 col-sm-10">
				<button id="searchButton" type="submit" class="btn btn-default">
					<fmt:message key="command.search"/>
				</button>
			</div>
		</div>		
	</fieldset>
</form>	  